<?php
	if(!isset($_REQUEST['ajax'])){ $_REQUEST['ajax'] = "";}
	if($_REQUEST['ajax']!=true) include 'header.tpl.php';
?>
	<ul class="shortcut-buttons-set">
		<li>
			<a class="shortcut-button" href='#salary_list'><span>
			<i class="aicon-task_list"></i>
			<?php echo $this->language['salaries'];?></span></a>
		</li>
		<li>
			<a class="shortcut-button" href='#import_salary'><span>
			<i class="aicon-import"></i>
			<?php echo $this->language['import_salary'];?></span></a>
		</li>
		<li>
			<a class="shortcut-button" href='#salary_formula'><span>
			<i class="aicon-salary_formula"></i>
			<?php echo $this->language['salary_formula'];?></span></a>
		</li>
	</ul>
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<span><img src='resources/images/icons/panel/task_all.png' /></span>
			<h3>Những dự án chưa Tất Toán</h3>
		</div>
		<div class="content-box-content">
            <table>
				<thead>
					<tr>
						<th width='85px'>Mã Dự Án</th>
						<th>Tên Dự án</th>
						<th width='120px'>Giá trị Dự án</th>
						<th width='120px'>Lợi nhuận</th>
                        <th width='120px'>Hành động</th>
					</tr>
				</thead>
				<tbody>
					<?php if(isset($this->projects)){
						foreach($this->projects as $row){ ?>
					<tr id="r<?php echo $row['pId'];?>">
						<td><a href="#" onClick="showPage('?func=project_view&ajax=true&pid=<?php echo $row['pId'];?>');"><?php echo $row['pCode'];?></a></td>
						<td><a href="#" onClick="showPage('?func=project_view&ajax=true&pid=<?php echo $row['pId'];?>');"><?php echo $row['pName'];?></a></td>
						<td><font color=green><?php echo number_format($row['pCredit'],0,'.',',');?></font></td>
                        <td><font color=red><?php echo number_format($row['pProfitCredit'],0,'.',',');?></font></td>
                        <td><a href='#' class="button" onClick="comProjectCredit('<?php echo $row['pId'];?>');" title="Xem chi tiết">Tất toán</a> </td>
					</tr>
					<?php }} ?>
				</tbody>
				<?php if(isset($this->tfoot)) echo $this->tfoot;?>
			</table>
		</div>
	</div>
	<div class="clear"></div>
<?php if(isset($this->breadcrumb) && isset($this->title_header)):?>
	<script type="text/javascript">
		$(function() {
			$("#title-header").text('<?php echo $this->title_header;?>');
			$("#breadcrumb").html('<?php echo build_breadcrumb($this->breadcrumb);?>');
		});
	</script>
<?php endif;?>
<?php
	if($_REQUEST['ajax']!=true) include 'footer.tpl.php';
?>